package jumpingnotes.service.remoting;

import jumpingnotes.model.Result;
import jumpingnotes.model.entity.ActivityMediaItem;
import jumpingnotes.model.entity.ActivityTemplateParam;
import jumpingnotes.model.entity.Audio;
import jumpingnotes.security.SessionManager;

public class FlashRemotingServiceImpl implements FlashRemotingService {
	protected SessionManager sessionManager;
	
	MemberService memberService;
	FriendService friendService;
	GroupService groupService;
	BookService bookService;
	RecordService recordService;
	
	public void setSessionManager(SessionManager sessionManager)
	{
		this.sessionManager = sessionManager;
	}

	public SessionManager getSessionManager()
	{
		return sessionManager;
	}

	
	public void setMemberService(MemberService memberService) {
		this.memberService = memberService;
	}

	public void setFriendService(FriendService friendService) {
		this.friendService = friendService;
	}

	public void setGroupService(GroupService groupService) {
		this.groupService = groupService;
	}

	public void setBookService(BookService bookService) {
		this.bookService = bookService;
	}
	
	public void setRecordService(RecordService recordService) {
		this.recordService = recordService;
	}
	
	@Override
	public Result bookCommentCreate(String bookID, String memberID,
			String comment) {
		// TODO Auto-generated method stub
		return bookService.bookCommentCreate(bookID, memberID, comment);
	}

	@Override
	public Result bookCommentDelete(String bookCommentID, String memberID) {
		// TODO Auto-generated method stub
		return bookService.bookCommentDelete(bookCommentID, memberID);
	}

	@Override
	public Result bookCoverVersionUpload(String bookID, String memberID,
			String image) {
		// TODO Auto-generated method stub
		return bookService.bookCoverVersionUpload(bookID, memberID, image);
	}

	@Override
	public Result bookCreate(String bookName, String author, String memberID) {
		// TODO Auto-generated method stub
		return bookService.bookCreate(bookName, author, memberID);
	}

	@Override
	public Result bookFavoriteCreate(String bookID, String memberID) {
		// TODO Auto-generated method stub
		return bookService.bookFavoriteCreate(bookID, memberID);
	}

	@Override
	public Result bookFavoriteDelete(String bookID, String memberID) {
		// TODO Auto-generated method stub
		return bookService.bookFavoriteDelete(bookID, memberID);
	}

	@Override
	public Result bookInfoVersionCreate(String bookID, String name,
			String subTitle, String abstract_, String author,
			String authorIntro, String publishPress, String publishYear,
			String chapterCount, String wordCount, String completeStatus,
			String website, String url, String memberID) {
		// TODO Auto-generated method stub
		return bookService
				.bookInfoVersionCreate(bookID, name, subTitle, abstract_,
						author, authorIntro, publishPress, publishYear,
						chapterCount, wordCount, completeStatus, website, url,
						memberID);
	}

	@Override
	public Result chapterCreate(String bookID, String memberID, String name,
			int number, String abstract_, String uuid) {
		// TODO Auto-generated method stub
		return bookService.chapterCreate(bookID, memberID, name, number, abstract_, uuid);
	}

	@Override
	public Result chapterVersionCreate(String chapterID, String memberID,
			String number, String name, String abstract_, String uuid) {
		// TODO Auto-generated method stub
		return bookService.chapterVersionCreate(chapterID, memberID, number,
				name, abstract_, uuid);
	}

	@Override
	public Result friendDelete(String memberIDTo, String memberIDFrom) {
		// TODO Auto-generated method stub
		return friendService.friendDelete(memberIDTo, memberIDFrom);
	}

	@Override
	public Result friendInvite(String memberIDTo, String memberIDFrom) {
		// TODO Auto-generated method stub
		return friendService.friendInvite(memberIDTo, memberIDFrom);
	}

	@Override
	public Result friendInviteConfirm(String memberIDTo, String friendConfirmID) {
		// TODO Auto-generated method stub
		return friendService.friendInviteConfirm(memberIDTo, friendConfirmID);
	}

	@Override
	public Result friendInviteDelete(String memberIDTo, String friendConfirmID) {
		// TODO Auto-generated method stub
		return friendService.friendInviteDelete(memberIDTo, friendConfirmID);
	}

	@Override
	public Result groupAdminDemote(String memberID, String groupID) {
		// TODO Auto-generated method stub
		return groupService.groupAdminDemote(memberID, groupID);
	}

	@Override
	public Result groupAdminPromote(String memberID, String groupID) {
		// TODO Auto-generated method stub
		return groupService.groupAdminPromote(memberID, groupID);
	}

	@Override
	public Result groupCreate(String memberID, String name, String intro,
			String image, String tag, String publicFlag) {
		// TODO Auto-generated method stub
		return groupService.groupCreate(memberID, name, intro, image, tag, publicFlag);
	}

	@Override
	public Result groupImageUpload(String memberID, String groupID, String image) {
		// TODO Auto-generated method stub
		return groupService.groupImageUpload(memberID, groupID, image);
	}

	@Override
	public Result groupInfoUpdate(String memberID, String groupID, String name,
			String intro, String tag) {
		// TODO Auto-generated method stub
		return groupService.groupInfoUpdate(memberID, groupID, name, intro, tag);
	}

	@Override
	public Result groupInvite(String memberIDTo, String memberIDFrom,
			String groupID) {
		// TODO Auto-generated method stub
		return groupService.groupInvite(memberIDTo, memberIDFrom, groupID);
	}

	@Override
	public Result groupInviteConfirm(String memberIDTo,
			String groupMemberConfirmID) {
		// TODO Auto-generated method stub
		return groupService.groupInviteConfirm(memberIDTo, groupMemberConfirmID);
	}

	@Override
	public Result groupInviteDelete(String memberIDTo,
			String groupMemberConfirmID) {
		// TODO Auto-generated method stub
		return groupService.groupInviteDelete(memberIDTo, groupMemberConfirmID);
	}

	@Override
	public Result groupJoin(String memberID, String groupID) {
		// TODO Auto-generated method stub
		return groupService.groupJoin(memberID, groupID);
	}

	@Override
	public Result groupPrivacyUpdate(String memberID, String groupID,
			String publicFlag) {
		// TODO Auto-generated method stub
		return groupService.groupPrivacyUpdate(memberID, groupID, publicFlag);
	}

	@Override
	public Result groupTopicCommentCreate(String memberID, String groupTopicID,
			String comment) {
		// TODO Auto-generated method stub
		return groupService.groupTopicCommentCreate(memberID, groupTopicID, comment);
	}

	@Override
	public Result groupTopicCommentDelete(String memberID,
			String groupTopicCommentID) {
		// TODO Auto-generated method stub
		return groupService.groupTopicCommentDelete(memberID, groupTopicCommentID);
	}

	@Override
	public Result groupTopicCreate(String memberID, String groupID,
			String title, String body) {
		// TODO Auto-generated method stub
		return groupService.groupTopicCreate(memberID, groupID, title, body);
	}

	@Override
	public Result groupTopicDelete(String memberID, String groupTopicID) {
		// TODO Auto-generated method stub
		return groupService.groupTopicDelete(memberID, groupTopicID);
	}

	@Override
	public Result groupTopicSticky(String memberID, String groupTopicID) {
		// TODO Auto-generated method stub
		return groupService.groupTopicSticky(memberID, groupTopicID);
	}

	@Override
	public Result groupTopicUnsticky(String memberID, String groupTopicID) {
		// TODO Auto-generated method stub
		return groupService.groupTopicUnsticky(memberID, groupTopicID);
	}

	@Override
	public Result groupTopicUpdate(String memberID, String groupTopicID,
			String title, String body) {
		// TODO Auto-generated method stub
		return groupService.groupTopicUpdate(memberID, groupTopicID, title, body);
	}

	@Override
	public Result isEmailUnique(String email) {
		// TODO Auto-generated method stub
		return memberService.isEmailUnique(email);
	}

	@Override
	public Result isPasswordCorrect(String memberID, String password) {
		// TODO Auto-generated method stub
		return memberService.isPasswordCorrect(memberID, password);
	}

	@Override
	public Result memberInfoUpdate(String memberID, String nickname,
			String aboutMe, String birthday, Character gender,
			String locationCity, String locationProvince,
			String locationCountry, String homepage) {
		// TODO Auto-generated method stub
		return memberService.memberInfoUpdate(memberID, nickname, aboutMe,
				birthday, gender, locationCity, locationProvince,
				locationCountry, homepage);
	}

	@Override
	public Result memberLogin(String email, String password) {
		// TODO Auto-generated method stub
		return memberService.memberLogin(email, password);
	}

	@Override
	public Result memberLogout(String email, String password) {
		// TODO Auto-generated method stub
		return memberService.memberLogout(email, password);
	}

	@Override
	public Result memberPasswordUpdate(String memberID, String password) {
		// TODO Auto-generated method stub
		return memberService.memberPasswordUpdate(memberID, password);
	}

	@Override
	public Result memberPortraitUpload(String memberID, String image,
			String imageBig, String imageSmall, String imageSquare) {
		// TODO Auto-generated method stub
		return memberService.memberPortraitUpload(memberID, image, imageBig,
				imageSmall, imageSquare);
	}

	@Override
	public Result memberRegister(String email, String password, String nickname) {
		// TODO Auto-generated method stub
		return memberService.memberRegister(email, password, nickname);
	}

	@Override
	public Result memberRegisterActivate(String email, String password) {
		// TODO Auto-generated method stub
		return memberService.memberRegisterActivate(email, password);
	}

	@Override
	public Result memberRegisterInvite(String email, String memberID) {
		// TODO Auto-generated method stub
		return memberService.memberRegisterInvite(email, memberID);
	}

	@Override
	public Result memberRegisterInviteActivate(String email, String password) {
		// TODO Auto-generated method stub
		return memberService.memberRegisterInviteActivate(email, password);
	}

	@Override
	public Result messageDelete(String memberID, String[] messageIDArray) {
		// TODO Auto-generated method stub
		return memberService.messageDelete(memberID, messageIDArray);
	}

	@Override
	public Result messageSend(String memberIDFrom, String memberIDTo,
			String title, String body) {
		// TODO Auto-generated method stub
		return memberService.messageSend(memberIDFrom, memberIDTo, title, body);
	}

	@Override
	public Result recordAlbumCreate(String memberID, String bookID, String publicFlag, String publicGroupID, String collabFlag, String name)
	{
		// TODO Auto-generated method stub
		return recordService.recordAlbumCreate(memberID, bookID, publicFlag, publicGroupID, collabFlag, name);
	}

	@Override
	public Result recordAlbumDelete(String memberID, String recordAlbumID) {
		// TODO Auto-generated method stub
		return recordService.recordAlbumDelete(memberID, recordAlbumID);
	}

	@Override
	public Result memberActivityCreate(String memberID,
			String activityType, ActivityTemplateParam[] activityParams,
			ActivityMediaItem[] mediaItems, String url, String priority){
		// TODO Auto-generated method stub
		return memberService.memberActivityCreate(memberID, activityType, activityParams, mediaItems, url, priority);
	}

	@Override
	public Result memberRegisterActivate(String memberConfirmId) {
		// TODO Auto-generated method stub
		return memberService.memberRegisterActivate(memberConfirmId);
	}

	@Override
	public Result recordTaskCreate(String recordAlbumID,
			String chapterID) {
		// TODO Auto-generated method stub
		return recordService.recordTaskCreate(recordAlbumID, chapterID);
	}

	@Override
	public Result recordTaskPublish(String recordTaskID) {
		// TODO Auto-generated method stub
		return recordService.recordTaskPublish(recordTaskID);
	}

	@Override
	public Result recordTaskUpdate(String recordTaskID, String status,
			String latestAudioID) {
		// TODO Auto-generated method stub
		return recordService.recordTaskUpdate(recordTaskID, status, latestAudioID);
	}

	@Override
	public Result bookExpectCreate(String bookID, String memberID, String reason) {
		// TODO Auto-generated method stub
		return bookService.bookExpectCreate(bookID, memberID, reason);
	}

	@Override
	public Result bookRecommendCreate(String bookID, String memberID,
			String target, String reason) {
		// TODO Auto-generated method stub
		return bookService.bookRecommendCreate(bookID, memberID, target, reason);
	}

	@Override
	public Result errorReportCreate(String memberID, String targetID,
			String subject, String body) {
		// TODO Auto-generated method stub
		return bookService.errorReportCreate(memberID, targetID, subject, body);
	}

	@Override
	public Result audioCreate(String recordTaskID, String syncID, String flvAudioID, String type,
			String subtype, String name, String uuid, String duration, String memberID,
			String collabMemberIDs) {
		// TODO Auto-generated method stub
		return recordService.audioCreate(recordTaskID, syncID, flvAudioID, type, subtype, name, uuid, duration, memberID, collabMemberIDs);
	}

	@Override
	public Result audioRate(String audioID, String rating) {
		// TODO Auto-generated method stub
		return recordService.audioRate(audioID, rating);
	}

	@Override
	public Result audioUpdate(String audioID, String syncID, String name, String duration, 
			String memberID, String collabMemberIDs) {
		// TODO Auto-generated method stub
		return recordService.audioUpdate(audioID, syncID, name, duration, memberID, collabMemberIDs);
	}

	@Override
	public Result syncCreate(String uuid, String content) {
		// TODO Auto-generated method stub
		return recordService.syncCreate(uuid, content);
	}

	@Override
	public Result syncUpdate(String syncID, String content) {
		// TODO Auto-generated method stub
		return recordService.syncUpdate(syncID, content);
	}

	@Override
	public Result groupDelete(String groupID) {
		// TODO Auto-generated method stub
		return groupService.groupDelete(groupID);
	}

	@Override
	public Result groupUpdate(String groupID, String name, String intro,
			String publicFlag) {
		// TODO Auto-generated method stub
		return groupService.groupUpdate(groupID, name, intro, publicFlag);
	}

	@Override
	public Result audioDeploy(String audioUuid, String deployType,
			String vendor, String model) {
		// TODO Auto-generated method stub
		return recordService.audioDeploy(audioUuid, deployType, vendor, model);
	}

	@Override
	public Result audioDeployProgress(String audioUuid, String deployType) {
		// TODO Auto-generated method stub
		return recordService.audioDeployProgress(audioUuid, deployType);
	}

	@Override
	public Result audioFilter(String input, String output, String bitRate,
			String sampleRate, String volume, String startTime, String duration) {
		// TODO Auto-generated method stub
		return recordService.audioFilter(input, output, bitRate, sampleRate, volume, startTime, duration);
	}

	@Override
	public Result audioFilterProgress(String input, String output) {
		// TODO Auto-generated method stub
		return recordService.audioFilterProgress(input, output);
	}

	@Override
	public Result isFriend(String memberIDTo, String memberIDFrom) {
		// TODO Auto-generated method stub
		return friendService.isFriend(memberIDTo, memberIDFrom);
	}

	@Override
	public Result isMemberOfGroup(String memberID, String groupID) {
		// TODO Auto-generated method stub
		return groupService.isMemberOfGroup(memberID, groupID);
	}

	@Override
	public Result audioDeployProgress(String deployUuid) {
		// TODO Auto-generated method stub
		return recordService.audioDeployProgress(deployUuid);
	}

	@Override
	public Result countMemberByFavoriteBook(String bookID) {
		// TODO Auto-generated method stub
		return bookService.countMemberByFavoriteBook(bookID);
	}

	@Override
	public Result recordTaskPrepare(String recordTaskID) {
		// TODO Auto-generated method stub
		return recordService.recordTaskPrepare(recordTaskID);
	}

	@Override
	public Result bookCoverFilter(String uuid, String subtype, String ratio,
			String x, String y, String width, String height) {
		// TODO Auto-generated method stub
		return bookService.bookCoverFilter(uuid, subtype, ratio, x, y, width, height);
	}

	@Override
	public Result memberPasswordRetrieve(String email) {
		// TODO Auto-generated method stub
		return memberService.memberPasswordRetrieve(email);
	}

	@Override
	public Result audioRecord(String memberID, String bookID,
			String recordTaskID) {
		// TODO Auto-generated method stub
		return recordService.audioRecord(memberID, bookID, recordTaskID);
	}

	@Override
	public Result deployDownload(String memberID, String deployUuid,
			String subtype) {
		// TODO Auto-generated method stub
		return recordService.deployDownload(memberID, deployUuid, subtype);
	}

	@Override
	public Result deployPlay(String memberID, String deployUuid, String subtype) {
		// TODO Auto-generated method stub
		return recordService.deployPlay(memberID, deployUuid, subtype);
	}

	@Override
	public Result friendInviteByEmail(String memberToEmail, String memberIDFrom) {
		// TODO Auto-generated method stub
		return friendService.friendInviteByEmail(memberToEmail, memberIDFrom);
	}

}
